# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnetfilter_queue
pkgver=1.0.3
pkgrel=0
pkgdesc="API to packets that have been queued by the kernel packet filter"
url="http://www.netfilter.org/projects/libnetfilter_queue/index.html"
arch="all"
license="GPL-2.0"
depends=""
makedepends="libnfnetlink-dev libmnl-dev linux-headers"
install=""
subpackages="$pkgname-dev"
source="https://www.netfilter.org/projects/libnetfilter_queue/files/libnetfilter_queue-$pkgver.tar.bz2"

builddir="$srcdir"/libnetfilter_queue-$pkgver
prepare() {
	cd "$builddir"
	default_prepare
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="1d9e0202878bc0ae26ceecd0f4fa4c21f89056e5671d46949f92f21c155d589958b7775760fc837547da34eb9a81e537e95c770d25c166e709dad16de4ca452e  libnetfilter_queue-1.0.3.tar.bz2"
